<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSettingsCodes extends \App\Utils\CreateMigration
{
    function columns(Blueprint $table)
    {
        $table->unsignedTinyInteger('module')->default(0)->comment('所属模块');
        $table->string('name', 50)->nullable()->comment('名称');
        $table->string('code', 100)->nullable()->comment('编码');
        $table->string('desc')->nullable()->comment('描述');
        $table->index(['code'], 'idx_code');
    }

    function tableInfo()
    {
        return ['settings__codes', '设置-字典'];
    }
}
